package com.siyue.model;

import java.math.BigDecimal;
import java.sql.Date;

public class Book {
	private long bookId;
	private long publishId;
	private String categoryId;
	private String bookName;
	private float bookPrice;
	private String bookAuthor;
	private String bookInfo;
	private Date publishDate;
	private int isSpecialPrice;
	private int isNew;
	private int isCommend;
	private String bookImg;
	private int amount;
	private double total;
	private double memberPrice;

	public double getSum() {
		double price = this.bookPrice * this.amount;
		BigDecimal bd = new BigDecimal(price);
		BigDecimal bd1 = bd.setScale(3, bd.ROUND_HALF_UP);
		return bd1.doubleValue();
	}

	public long getBookId() {
		return bookId;
	}

	public void setBookId(long bookId) {
		this.bookId = bookId;
	}

	public long getPublishId() {
		return publishId;
	}

	public void setPublishId(long publishId) {
		this.publishId = publishId;
	}

	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	public String getBookName() {
		return bookName;
	}

	public void setBookName(String bookName) {
		this.bookName = bookName;
	}

	public float getBookPrice() {
		return bookPrice;
	}

	public void setBookPrice(float bookPrice) {
		this.bookPrice = bookPrice;
	}

	public String getBookAuthor() {
		return bookAuthor;
	}

	public void setBookAuthor(String bookAuthor) {
		this.bookAuthor = bookAuthor;
	}

	public String getBookInfo() {
		return bookInfo;
	}

	public void setBookInfo(String bookInfo) {
		this.bookInfo = bookInfo;
	}

	public Date getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	public int getIsSpecialPrice() {
		return isSpecialPrice;
	}

	public void setIsSpecialPrice(int isSpecialPrice) {
		this.isSpecialPrice = isSpecialPrice;
	}

	public int getIsNew() {
		return isNew;
	}

	public void setIsNew(int isNew) {
		this.isNew = isNew;
	}

	public int getIsCommend() {
		return isCommend;
	}

	public void setIsCommend(int isCommend) {
		this.isCommend = isCommend;
	}

	public String getBookImg() {
		return bookImg;
	}

	public void setBookImg(String bookImg) {
		this.bookImg = bookImg;
	}

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public double getTotal() {
		return total;
	}

	public void setTotal(double total) {
		this.total = total;
	}

	public double getMemberPrice() {
		return memberPrice;
	}

	public void setMemberPrice(double memberPrice) {
		this.memberPrice = memberPrice;
	}

}
